/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jkoa.model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author fikri
 */
@Entity
@Table(name = "mohon")
@NamedQueries({
    @NamedQuery(name = "Mohon.findAll", query = "SELECT m FROM Mohon m")})
public class Mohon implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id_mohon")
    private Integer idMohon;
    @Column(name = "no_pengenalan")
    private String noPengenalan;
    @Column(name = "kod_pengenalan")
    private String kodPengenalan;
    @Column(name = "nama")
    private String nama;
    @Column(name = "id_majikan")
    private Integer idMajikan;
    @Column(name = "kod_sektor1")
    private String kodSektor1;
    @Column(name = "kod_sektor2")
    private String kodSektor2;
    @Column(name = "kod_sektor3")
    private String kodSektor3;
    @Basic(optional = false)
    @Column(name = "dimasuk")
    private String dimasuk;
    @Basic(optional = false)
    @Column(name = "trh_masuk")
    @Temporal(TemporalType.TIMESTAMP)
    private Date trhMasuk;
    @Column(name = "dikkini")
    private String dikkini;
    @Column(name = "trh_kkini")
    @Temporal(TemporalType.TIMESTAMP)
    private Date trhKkini;

    public Mohon() {
    }

    public Mohon(Integer idMohon) {
        this.idMohon = idMohon;
    }

    public Mohon(Integer idMohon, String dimasuk, Date trhMasuk) {
        this.idMohon = idMohon;
        this.dimasuk = dimasuk;
        this.trhMasuk = trhMasuk;
    }

    public Integer getIdMohon() {
        return idMohon;
    }

    public void setIdMohon(Integer idMohon) {
        this.idMohon = idMohon;
    }

    public String getNoPengenalan() {
        return noPengenalan;
    }

    public void setNoPengenalan(String noPengenalan) {
        this.noPengenalan = noPengenalan;
    }

    public String getKodPengenalan() {
        return kodPengenalan;
    }

    public void setKodPengenalan(String kodPengenalan) {
        this.kodPengenalan = kodPengenalan;
    }

    public String getNama() {
        return nama;
    }

    public void setNama(String nama) {
        this.nama = nama;
    }

    public Integer getIdMajikan() {
        return idMajikan;
    }

    public void setIdMajikan(Integer idMajikan) {
        this.idMajikan = idMajikan;
    }

    public String getKodSektor1() {
        return kodSektor1;
    }

    public void setKodSektor1(String kodSektor1) {
        this.kodSektor1 = kodSektor1;
    }

    public String getKodSektor2() {
        return kodSektor2;
    }

    public void setKodSektor2(String kodSektor2) {
        this.kodSektor2 = kodSektor2;
    }

    public String getKodSektor3() {
        return kodSektor3;
    }

    public void setKodSektor3(String kodSektor3) {
        this.kodSektor3 = kodSektor3;
    }

    public String getDimasuk() {
        return dimasuk;
    }

    public void setDimasuk(String dimasuk) {
        this.dimasuk = dimasuk;
    }

    public Date getTrhMasuk() {
        return trhMasuk;
    }

    public void setTrhMasuk(Date trhMasuk) {
        this.trhMasuk = trhMasuk;
    }

    public String getDikkini() {
        return dikkini;
    }

    public void setDikkini(String dikkini) {
        this.dikkini = dikkini;
    }

    public Date getTrhKkini() {
        return trhKkini;
    }

    public void setTrhKkini(Date trhKkini) {
        this.trhKkini = trhKkini;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idMohon != null ? idMohon.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Mohon)) {
            return false;
        }
        Mohon other = (Mohon) object;
        if ((this.idMohon == null && other.idMohon != null) || (this.idMohon != null && !this.idMohon.equals(other.idMohon))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.jkoa.model.Mohon[ idMohon=" + idMohon + " ]";
    }
    
}
